import level_PeopleArcheryUnitBase from "../base/level_PeopleArcheryUnitBase";
import level_peopleArchery from "../level_peopleArchery";

const {ccclass, property} = cc._decorator;

@ccclass
export default class level_peopleArcheryMap extends level_PeopleArcheryUnitBase {

    @property({type:level_peopleArchery})
    level: level_peopleArchery = null;

    update(dt: number){
        if(this.level.gamePauseFlag){
            return;
        }
        let moveDis:number = this.level.getRoleMoveSpd() * dt;
        this.node.y -= moveDis;
        if(this.node.y <= -1961){
            let exceedY:number = this.node.y + 1961;
            let curY:number = 1961 * 2 + exceedY;
            this.node.y = curY;
        }
    }

}
